package com.finance.system.dao;

import com.finance.system.bean.pojo.RoleMenuRel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface RoleMenuMapper {
  RoleMenuRel getById(Long id);
  List<RoleMenuRel> listByUserCode(String code);
  int add(RoleMenuRel roleMenuRel);
  int update(RoleMenuRel roleMenuRel);
  int delete(Long id);
  int deleteByCode(String code);
  List<RoleMenuRel> queryNo(String code);
  List<RoleMenuRel> getByRoleId(Long roleId);
  int delUserRole(Long roleId);
  int delByRoleId(Long roleId);
  int delUser(String code);

  int batchAdd(@Param("roleMenuRelRelList") List<RoleMenuRel> userRoleRelList);

  int batchInvalid(@Param("uId") Long uId, @Param("roleMenuRelRelList") List<RoleMenuRel> roleMenuRelList);

  int batchValid(@Param("uId") Long uId, @Param("roleMenuRelRelList") List<RoleMenuRel> roleMenuRelList);

  int bathDelByCode(@Param("code") List<String> code);

  List<RoleMenuRel> listByRoleId(Long roleId);

}